﻿using System;
using System.Web.UI;

public partial class Ajax : Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Page_PreInit(object sender, EventArgs e)
    {
        //Valid permission
        var typePage = Request["typePage"];
        //Request.QueryString["noneCache"] = "true";

        string masterPage;
        switch (typePage)
        {
            case "Custom":
                masterPage = "~/MasterPage/Custom.Master";
                break;
            case "RadEditor":
                masterPage = "~/MasterPage/RadEditor.Master";
                break;
            default:
                masterPage = "~/MasterPage/Ajax.Master";
                break;
        }
        Page.MasterPageFile = masterPage;
        if (Master != null) Master.FindControl("ContentPlaceHolderMain").Visible = true;
    }
}